<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.o/Publictml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <link href="/Public/lib/ligerUI/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
    <script src="/Public/lib/jquery/jquery-1.9.0.min.js" type="text/javascript"></script>
    <script src="/Public/lib/json2.js" type="text/javascript"></script>
    <script src="/Public/lib/ligerUI/js/core/base.js" type="text/javascript"></script>
    <script src="/Public/lib/ligerUI/js/plugins/ligerDialog.js" type="text/javascript"></script>
    <script src="/Public/lib/ligerUI/js/plugins/ligerTextBox.js" type="text/javascript"></script>
    <script src="/Public/lib/ligerUI/js/plugins/ligerCheckBox.js" type="text/javascript"></script>
    <script src="/Public/lib/ligerUI/js/plugins/ligerComboBox.js" type="text/javascript"></script>
    <script src="/Public/lib/ligerUI/js/plugins/ligerGrid.js" type="text/javascript"></script>
    <script src="/Public/lib/ligerUI/js/plugins/ligerDateEditor.js" type="text/javascript"></script>
    <script src="/Public/lib/ligerUI/js/plugins/ligerSpinner.js" type="text/javascript"></script>
    <script type="text/javascript">

         var manager;
        $(function ()
        {
            var beforeTime;
            window['g'] = 
            manager = $("#maingrid").ligerGrid({
                columns: [
                { display: 'ID', name: 'id', width: 50, align: 'left' },
                { display: '蓝桥到站', name: 'lqdaoz', width: 150, type: 'int', align: 'left' }, 
                { display: '蓝桥线路', name: 'lqxianl', width: 150, align: 'left' },
                { display: '经由', name: 'jingy', width: 150, type: 'int', align: 'left' },
                { display: '省份', name: 'shengfen', width: 150, align: 'left' },
                { display: '地级市',name:'dijis',align:'left'},
                { display: '县级',name:'xianji',align:'left'},
                {display:'乡镇',name:'xiangzhen',align:'left'},
                {display:'配送类型',name:'pstype',align:'left'},
                {display:'参考配送类型',name:'ckpstype',align:'left'},
                {display:'到货天数',name:'dhts',align:'left'},
                {display:'区间公里数',name:'qjgls',align:'left'},
                {display:'排序',name:'px',width:100,align:'left'},
                ], width: '100%', pageSizeOptions: [5, 10, 15, 20], height: '97%',
                url: '<?php echo U("Home/Edit/Ajaxlqdz");?>',
                dataAction: 'server', //服务器排序
                usePager: false,       //服务器分页 
                alternatingRow: false, 
                pageSize: 30,
                onBeforeShowData: function ()
                {
                    beforeTime = new Date().getTime();
                },
                onAfterShowdata: function ()
                { 
                    var diffValue = new Date().getTime() - beforeTime;
                    diffValue = diffValue / 1000;

                    $("#message").html("渲染时间:" + diffValue + "秒");
                }
            }
            );
        });


        function getSelected()
        {
            var row = manager.getSelectedRow();
            if (!row) { alert('请选择行'); return; }
            alert(JSON.stringify(row));
        } 
        function reload()
        {
            manager.reload(1);
        }
    </script>
</head>
<body  style="padding:10px">
 <a class="l-button" style="width:80px;float:left; margin-left:6px;" onclick="beginEdit()">修改行</a>
  <a class="l-button" style="width:80px;float:left; margin-left:6px;" onclick="endEdit()">提交修改</a>
    <a class="l-button" style="width:80px;float:left; margin-left:6px;" onclick="endAllEdit()">提交全部</a>
 <a class="l-button" style="width:80px;float:left; margin-left:6px;" onclick="cancelEdit()">取消修改</a>
  <a class="l-button" style="width:80px;float:left; margin-left:6px;" onclick="cancelAllEdit()">取消全部</a>


<a class="l-button" style="width:120px;float:left; margin-left:6px;" onclick="deleteRow()">删除选择的行</a>

<a class="l-button" style="width:100px;float:left; margin-left:6px;" onclick="addNewRow()">添加行</a>


 <div id="message"></div>

 <div class="l-clear"></div>
    <div id="maingrid" style="margin-top:20px"></div> <br />
       <br />
   <a class="l-button" style="width:120px" onclick="getSelected()">获取选中的值(选择行)</a>
 
   <br />
   <a class="l-button" style="width:120px" onclick="getData()">获取当前的值</a>
  <div style="display:none;">
  <!-- g data total ttt -->
</div>
</body>
</html>